package top.yangyitao.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name="paySlip")
public class PaySlip {
	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE)
	long id;
	@Column
	String printDay;
	@Column
	String startDay;//开始日期
	@Column
	String endDay;//结束日期
	@Column
	int workDays;//出勤天数
	@Column
	int lateOrLeaveTimes;//迟到早退次数
	@Column
	int absentTimes;//矿工次数
	@Column
	String realCash;//实发工资
	@Column
	String cash;//工资
	@Column
	String bonusCash;//奖金
	@ManyToOne
	User user;
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public long getId() {
		return id;
	}
}
